package dao.user.impl;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import annotation.DBUrl;

import po.User;
import dao.user.UserDAO;

public class UserDAOImpl extends SqlMapClientDaoSupport implements UserDAO {

	@Override
	public void deleteUser(String loginname) {
	
	}

	@Override
	public User getUser(String loginname) {
		return (User)this.getSqlMapClientTemplate().queryForObject("getUser",loginname);
	}

	@Override
	public void insertUser(User user) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void updateUser(User user) {
		this.getSqlMapClientTemplate().update("updateUser",user);	
	}

	@Override
	public User getUser(@DBUrl String dbUrl, String loginname) {
		return (User)this.getSqlMapClientTemplate().queryForObject("getUser",loginname);
	}

}
